package com.mhc.suzuki.service;

import com.mhc.haval.api.dto.StaffDTO;
import com.mhc.suzuki.bo.*;
import com.mhc.suzuki.dal.query.DataDictQuery;
import com.mhc.suzuki.dal.query.OrderQuery;
import com.mhc.suzuki.dal.query.OverdueListQuery;
import com.mhc.suzuki.exception.SuzukiCommonException;
import com.mhc.suzuki.vo.DepartmentVO;
import com.mhc.suzuki.vo.OrderVO;
import com.mhc.suzuki.vo.OverdueCollectTaskVO;
import com.mhc.suzuki.vo.OverdueListVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/8/25.
 */
public interface OverdueService {

    /**
     * 查询逾期清单列表，查询条件可以有客户姓名，客户身份证号，银行名称
     *
     * @param overdueListQuery
     * @return
     * @throws SuzukiCommonException
     */
    List<OverdueListVO> getOverdueList(OverdueListQuery overdueListQuery) throws SuzukiCommonException;

    /**
     * 查询逾期列表总数目
     *
     * @param overdueListQuery
     * @return
     */
    Integer getCountByQuery(OverdueListQuery overdueListQuery);

    /**
     * 查询只根据逾期记录中的银行卡号，能查到的所有订单号
     *
     * @param overdueId
     * @return
     * @throws SuzukiCommonException
     */
    List<String> getOrderNoByOverdueId(Long overdueId) throws SuzukiCommonException;

    /**
     * 根据逾期记录编号与已确定的订单编号，获取催收记录详情
     *
     * @param orderNo
     * @return
     * @throws SuzukiCommonException
     */
    DebtCollectDetailBO getDebtCollectDetail(String orderNo) throws SuzukiCommonException;

    /**
     * 根据查询条件（多条订单编号），获取对应的订单列表
     *
     * @param orderQuery
     * @return
     * @throws SuzukiCommonException
     */
    List<OrderVO> getOverdueOrderList(OrderQuery orderQuery) throws SuzukiCommonException;

    /**
     * 获取资产保全部外勤的催收待办列表
     *
     * @param queryMap
     * @return
     */
    List<OverdueCollectTaskVO> getOutWorkerTaskList(Map queryMap) throws SuzukiCommonException;

    /**
     * 上传逾期清单文件
     *
     * @param staffId
     * @param overdueListFiles
     * @return
     * @throws SuzukiCommonException
     */
    Boolean uploadOverdueList(Long staffId, List<MultipartFile> overdueListFiles) throws SuzukiCommonException;

    /**
     * 新增电催记录
     *
     * @param staffId
     * @param debtCollectHisBO
     * @return
     * @throws SuzukiCommonException
     */
    Boolean addCallingDebtRecord(Long staffId, DebtCollectHisBO debtCollectHisBO) throws SuzukiCommonException;

    /**
     * 新增上门催收记录
     *
     * @param staffId
     * @param debtCollectHisBO
     * @return
     * @throws SuzukiCommonException
     */
    Boolean addVisitDebtRecord(Long staffId, DebtCollectHisBO debtCollectHisBO) throws SuzukiCommonException;

    /**
     * 新增拖车记录
     *
     * @param staffId
     * @param towingHisBO
     * @return
     * @throws SuzukiCommonException
     */
    Boolean addOrUpdateTowingHis(Long staffId, TowingHisBO towingHisBO) throws SuzukiCommonException;

    /**
     * 新增法院诉讼记录
     *
     * @param staffId
     * @param lawsuitHisBO
     * @return
     * @throws SuzukiCommonException
     */
    Boolean addLawsuitHis(Long staffId, LawsuitHisBO lawsuitHisBO) throws SuzukiCommonException;

    /**
     * 分配外勤（上门催收）
     *
     * @param staffId
     * @param distributeCollectBO
     * @return
     * @throws SuzukiCommonException
     */
    Boolean distributeCollectTask(Long staffId, DistributeCollectBO distributeCollectBO) throws SuzukiCommonException;

    /**
     * 从数据字典中获取部门列表
     *
     * @param dataDictQuery
     * @return
     * @throws SuzukiCommonException
     */
    List<DepartmentVO> getDepartmentListInDataDict(DataDictQuery dataDictQuery) throws SuzukiCommonException;

    /**
     * 获取订单对应的上门催收处理人（上门外勤）
     *
     * @param orderNo
     * @return
     * @throws SuzukiCommonException
     */
    List<StaffDTO> getOrderCollectOutWorkers(String orderNo) throws SuzukiCommonException;

}
